export function debounce(func, wait) {
    let timeout;
    let _this = this;
    return function (...args) {
        if (timeout) {
            clearTimeout(timeout);
        }
        timeout = setTimeout(() => {
            func.apply(_this, args);
        }, wait);
    };
}
